import request from '@/utils/request'

export function fetchList(params) {
    return request({
        url: '/oms/OmsOrderReturnApply/list',
        method: 'get',
        params: params
    })
}

export function deleteApply(id) {
    return request({
        url: '/oms/OmsOrderReturnApply/delete' + id,
        method: 'get'
    })
}

export function updateApplyStatus(id, data) {
    return request({
        url: '/oms/OmsOrderReturnApply/update/status/' + id,
        method: 'post',
        data: data
    })
}

export function getApplyDetail(id) {
    return request({
        url: '/oms/OmsOrderReturnApply/' + id,
        method: 'get'
    })
}

export function getBillAftersalesDetail(id) {
    return request({
        url: '/bill/billAftersales/' + id,
        method: 'get'
    })
}

export function getBillAftersalesList(params) {
    return request({
        url: '/bill/billAftersales/list',
        method: 'get',
        params: params
    })
}

/**
 * 确认发货
 * @param params
 */
export function handleDeliverGoods(params) {
    return request({
        url: '/bill/billAftersales/handleDeliverGoods',
        method: 'post',
        params: params
    })
}

/**
 * 确认收货
 * @param params
 */
export function confirmReceipt(params) {
  return request({
    url: '/bill/billAftersales/confirmReceipt',
    method: 'post',
    params: params
  })
}

export function operateHistoryList(params) {
    return request({
        url: '/bill/billAftersales/operateHistoryList',
        method: 'get',
        params: params
    })
}

/**
 * 确认退换货
 * @param params
 */
export function confirmReturn(params) {
    return request({
        url: '/bill/billAftersales/confirmReturn',
        method: 'post',
        params: params
    })
}

/**
 * 拒绝退换货
 * @param params
 */
export function rejectReturn(params) {
    return request({
        url: '/bill/billAftersales/rejectReturn',
        method: 'post',
        params: params
    })
}




